Component({
  properties: {
    layout: {
      type: Object,
      value: {}
    }
  },
  data: {},
  methods: {
    onTap(e) {
      const id = this.data.layout.id;
      const variant = this.data.layout.variant;
      const image = this.data.layout.image;
      wx.navigateTo({
        url: `/pages/detail/index?id=${id}&variant=${variant}&poster=${image}`,
        fail(res) {
          console.warn(res);
        }
      })
    }
  }
})
